import { CHANG_ED } from './types'
export const defaultState = {
  checked1: 1
}
export default (state = defaultState, action) => {
  // 更改checked1
  if (action.type === CHANG_ED) {
    const newnum = JSON.parse(JSON.stringify(state))
    newnum.checked1 = action.value
    // console.log(newnum)

    localStorage.setItem('check', newnum.checked1)
    return newnum
  }
  return state
}
